473,473 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to Embed HTML in JavaScript

3 New Member
I want to embed the following code in javascript function javascript function is written just after the object code, I want to replace the popup window code with this object code while the file name will be received in function parameter.

[HTML]<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=10,0,0,0"
ID=Child1 width=820 height=621>
<param name=src value="Child1.dcr">
<param name=swRemote value="swSaveEnabled='true' swVolume='true' swRestart='true' swPausePlay='true' swFastForward='true' swContextMenu='true' ">
<param name=swStretchStyle value=none>
<PARAM NAME=bgColor VALUE=#DDDDDD>
<embed src="Child1.dcr" bgColor=#DDDDDD width=820 height=621 swRemote="swSaveEnabled='true' swVolume='true' swRestart='true' swPausePlay='true' swFastForward='true' swContextMenu='true' " swStretchStyle=none
type="application/x-director" pluginspage="http://www.macromedia.com/shockwave/download/"></embed>
</object>[/HTML]

[HTML]<script type="text/javascript">
function jump(menu){
var vLen = menu.choice.options[menu.choice.selectedIndex].value.length;
var vExt = menu.choice.options[menu.choice.selectedIndex].value.substring(vLen-3,vLen);

if (vExt == 'dxr' || vExt == 'dcr'){
MyWindow3=window.open('images/'+menu.choice.options[menu.choice.selectedIndex].value,'MyWindow3',"height=600,width=800,toobar=0, location=0,directories=0,status=0,menubar=0,scroll bars=1,resizeable=0");
vExt=null;
}
}
</script>[/HTML]
Nov 4 '08 #1
1 6232
acoder
16,027 Recognized Expert Moderator MVP
I want to replace the popup window code with this object code
Do you mean you want to create the object element or do you want to set the value of a param element?
Nov 4 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Csaba2000 | last post by:
I want to be able to embed a single quote into an INPUT element within a dynamically generated IFRAME. The example below shows how the IFRAME is generated. Challenge: I'd like the alert box to...
3
by: Tony Sutton | last post by:
I have this following code in my html file: <object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#...
8
by: jalexa9898 | last post by:
I am asking because I wrote some flex that was put in xml and I want to embed it in some html is this hard to do?
3
by: abrtlt | last post by:
I would like to have a web page in which, when the user clicks on any of several specific elements, a specific audio file is played, without reloading the page. The specific audio file name is...
2
polymorphic
by: polymorphic | last post by:
I am no longer good at Javascript and need help. I'm trying to embed pdf files in html then build some sort of navigation between the pdfs via the pdf numbered file name. I can generate the...
13
by: windsorben | last post by:
I have some javascript that checks whether or not an answer is correct. It was working fine when the question was asked with text but now that I'm asking the question with audio, the javascript no...
3
by: helraizer1 | last post by:
I have this code in JS function show_player() { document.mediaplayer1.style.visibility = "visible"; } function content(p, clip) { var mus = document.getElementById('music'); ...
5
by: elbin | last post by:
Hello, first to say that I am a total beginner in Javascript but I know some programming (python in particular) and am able to understand methods/parameters and so on. Here's my problem: I am...
2
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.